#include "config_file.h"

Config_file::Config_file()
{
    QString full_file_name = QCoreApplication::applicationDirPath() + "/" + setting_file_name;
    m_psetting = new QSettings(full_file_name, QSettings::IniFormat);
}

void Config_file::set(QString qstrnodename, QString qstrkeyname, QVariant qvarvalue)
{
    m_psetting->setValue(QString("%1/%2").arg(qstrnodename).arg(qstrkeyname), qvarvalue);
}

QVariant Config_file::get(QString qstrnodename, QString qstrkeyname)
{
    QVariant qvar = m_psetting->value(QString("%1/%2").arg(qstrnodename).arg(qstrkeyname));
    return qvar;
}


